import request from '@/utils/request'
import dark from "echarts/src/theme/dark";
import request1 from "../../utils/request1";

// 查询雇主责任险保单列表
export function listInsureEli(query) {
  return request({
    url: '/insurance/insureEli/list',
    method: 'get',
    params: query
  })
}

// 查询雇主责任险保单详细
export function getInsureEli(id) {
  return request({
    url: '/insurance/insureEli/' + id,
    method: 'get'
  })
}
// 查询雇主责任险保单详细
export function getInsureEli1(id) {
  return request1({
    url: '/Insurance/insure_detail?insure_id='+id ,
    method: 'get',
    // data: data
  })
}

// 新增雇主责任险保单
export function addInsureEli(data) {
  return request({
    url: '/insurance/insureEli',
    method: 'post',
    data: data
  })
}
// 新增雇主责任险保单
export function addInsureEli1(data) {
  return request1({
    url: '/Insurance/insert_insure_eli',
    method: 'post',
    data: data
  })
}

// 修改雇主责任险保单
export function updateInsureEli(data) {
  return request({
    url: '/insurance/insureEli',
    method: 'put',
    data: data
  })
}
// 修改雇主责任险保单
export function updateInsureEli1(data) {
  return request1({
    url: '/Insurance/insure_edit',
    method: 'post',
    data: data
  })
}

// 删除雇主责任险保单
export function delInsureEli(id) {
  return request({
    url: '/insurance/insureEli/' + id,
    method: 'delete'
  })
}

// 导出雇主责任险保单
export function exportInsureEli(query) {
  return request({
    url: '/insurance/insureEli/export',
    method: 'get',
    params: query
  })
}
//导出保单word
export function exportWord(id,dark){
  return request({
    url: '/insurance/insureEli/exportWord/' + id,
    method: 'get',
    // responseType: "blob",
    // header: {"Content-Type": "multipart/form-data"},
    // headers:{
    //   "Content-Type":"application/json;application/vnd.ms-excel"
    // }
    // headers:{
    //   "Content-Type":"application/json; application/octet-stream"
    // }
  })
}
//设置保单号
// export function insureNo(id){
//   return request({
//     url: '/insurance/insureEli/setInsureNo',
//     method: 'put',
//     params: id
//   })
// }
//设置保单号
export function insureNo(data){
  return request1({
    url: '/Insurance/add_edit_no',
    method: 'post',
    params: data
  })
}
